<?php
/* SVN FILE: $Id: mysql_tables.php 231 2009-09-28 17:24:43Z supersmashbrothers $ */
/**
* ibMarket 2
* IP.Board 3.0
* Bank Plugin
* ibMarket SQL installation create and alter queries
*
* @author $Author: supersmashbrothers $
* @copyright $Copyright$
* @version $Revision: 231 $
* @lastrevision $Date: 2009-09-28 17:24:43 +0000 (Mon, 28 Sep 2009) $
* @modifiedby $LastChangedBy: supersmashbrothers $
* @lastmodified $LastChangedDate: 2009-09-28 17:24:43 +0000 (Mon, 28 Sep 2009) $
* @filesource $URL: http://ipb-ibmarket.googlecode.com/svn/ibmarket2/trunk/admin/applications_addon/other/ibmarket/plugins/bank/install/mysql_tables.php $
*/

$TABLE[] = "CREATE TABLE market_bank_starter (
  starter_id mediumint(8) NOT NULL auto_increment,
  s_name varchar(255) NOT NULL default '',
  s_description text NOT NULL,
  s_interest_time int(10) NOT NULL default '0',
  s_interest_rate float(15,10) NOT NULL default '0.0000000000',
  s_deposit_fee float(15,10) NOT NULL default '0.0000000000',
  s_withdraw_fee float(15,10) NOT NULL default '0.0000000000',
  create_price bigint(19) NOT NULL default '0',
  delete_fee bigint(19) NOT NULL default '0',
  PRIMARY KEY (starter_id)
);";

$TABLE[] = "CREATE TABLE market_bank_accounts (
  account_id int(10) NOT NULL auto_increment,
  a_random mediumint(6) NOT NULL default '0',
  a_mem_id mediumint(8) NOT NULL default '0',
  a_name varchar(255) NOT NULL default '',
  a_open int(10) NOT NULL default '0',
  balance bigint(19) NOT NULL default '0',
  a_interest_time int(10) NOT NULL default '0',
  a_last_interest int(10) NOT NULL default '0',
  interest_rate float(15,10) NOT NULL default '0.0000000000',
  a_deposit_fee float(15,10) NOT NULL default '0.0000000000',
  a_withdraw_fee float(15,10) NOT NULL default '0.0000000000',
  a_delete_fee bigint(19) NOT NULL default '0',
  PRIMARY KEY (account_id),
  KEY account_id (a_mem_id,a_random,account_id),
  KEY member_id (a_mem_id)
);";

$TABLE[] = "CREATE TABLE market_bank_transactions (
  l_id int(10) NOT NULL auto_increment,
  l_account_id varchar(255) NOT NULL default '',
  l_timestamp int(10) NOT NULL default '0',
  l_ip_address varchar(15) NOT NULL default '',
  l_action varchar(255) NOT NULL default '',
  l_amount bigint(15) NOT NULL default '0',
  l_balance bigint(15) NOT NULL default '0',
  l_fee bigint(15) NOT NULL default '0',
  PRIMARY KEY (l_id),
  KEY account_id (l_account_id)
);";
?>